package com.juyu.miliao.api.dao.mysql;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.juyu.miliao.api.domain.Vip;

@Repository
public class VipDao {
	@Autowired
	private SqlSession sqlSession;
	
	public List<Vip> getVipList(){
		return sqlSession.selectList("getVipList");
	}

	public Vip getVipById(int vipId){
		return sqlSession.selectOne("getVipById", vipId);
	}

    public List<Vip> getVipListByType(Integer type) {
		return sqlSession.selectList("getVipListByType",type);
    }
}
